package com.misoneism.fire.commands
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.misoneism.fire.events.HighlightIncidentEvent;
	
	public class HighlightIncidentCommand
			implements ICommand
	{
		public function execute(event:CairngormEvent):void
		{
			var highlightIncidentEvent:HighlightIncidentEvent = event as HighlightIncidentEvent;
			
			if (highlightIncidentEvent.type == HighlightIncidentEvent.SHOW_INCIDENT_HIGHLIGHT_EVENT)
				highlightIncidentEvent.incident.showHighlight();
			else
				highlightIncidentEvent.incident.removeHighlight();
		}
	}
}